package cn.sptpc.dao;

import cn.sptpc.entity.java.Department;

import java.util.List;

public interface DepartmentDao {

    /**
     * 插入一条记录
     * @param department
     * @return
     */
    Integer insertDepartment(Department department);

    /**
     * 通过id更新一条记录
     * @param department
     * @return
     */
    Integer updataDepartment(Department department);

    /**
     * 获取行总数
     * @return
     */
    Integer countAllDepartment();

    /**
     * 通过id 查询一条记录
     * @param id
     * @return
     */
    Department queryDepartment(int id);

    /**
     * 查询所有部门
     * @return
     */
    List<Department> getAllDepartment();

    Department queryDepartment(String name);
}
